(use-package smartparens
  ;; :diminish smartparens-mode
  :hook
  ((prog-mode emacs-lisp-mode lisp-mode) . smartparens-strict-mode)
  ((org-mode eshell-mode shell-mode geiser-repl-mode inferior-python-mode) . smartparens-mode)
  :bind
  (:map smartparens-mode-map
	("C-M-a" . sp-beginning-of-sexp)
	("C-M-e" . sp-end-of-sexp)
	("C-M-f" . sp-forward-sexp)
	("C-M-b" . sp-backward-sexp)
	("C-M-n" . sp-next-sexp)
	("C-M-p" . sp-previous-sexp)
	("M-]" . sp-unwrap-sexp)
	("M-D" . delete-pair)
	("C-<right>" . sp-forward-slurp-sexp)
	("C-<left>" . sp-forward-barf-sexp)
	("C-M-<left>" . sp-backward-slurp-sexp)
	("C-M-<right>" . sp-backward-barf-sexp))
  ;; :custom
  ;; (smartparens-global-mode t)
  :init
  (autoload 'sp-local-pair "smartparens")
  (autoload 'sp-local-tag  "smartparens")
  :config
  (require 'smartparens-config))
